<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf8">
        <title>代码库</title>
        <link href="<?php echo base_url(); ?>CSS/WebPages.css" rel="stylesheet" type="text/css">
        <link href="<?php echo base_url(); ?>CSS/GLOBAL.css" rel="stylesheet" type="text/css">
        <script language="javascript" type="text/javascript" src="<?php echo base_url(); ?>JS/jquery.js"></script>
    </head>

    <body>
        <div id="CONTAINER" class="Box">
            <div id="Main">
                <div id="Position">
                    代码库分类：
                    <?php
                    if (is_array($category)) {
                        foreach ($category as $category_item) {
                            ?>
                            <a href="<?php echo site_url(); ?>/Code/Select_Category/<?php echo $category_item['Cate_Id'] ?>"><?php echo $category_item['Cate_Name'] ?></a>&nbsp;&nbsp;
                            <?php
                        }
                    }
                    ?>
                </div>
                <?php echo validation_errors('<p class="error">', '</p>'); ?>
                <?php echo form_open('Code/Select_Code'); ?>
                <h2><label for="s_Name">查询: </label><?php echo form_input('s_Name'); ?>&nbsp;&nbsp;<input name="select" type="submit" id="select" value="提交" />
                    <? echo form_close(); ?>
                    <span class="more"><a href="<?php echo site_url(); ?>/Code/addCode">发布代码</a></span>
                </h2>
                <!--根分类最新日志列表-->
                <div class="codeList">
                    <?php
                    if (is_array($code)) {
                        foreach ($code as $code_item) {
                            ?>
                            <div class="codeItem left">
                                <div class="codeSubject cutstr">
                                    <a href="<?php echo site_url(); ?>/Code/Show_Code/<?php echo $code_item['C_Id'] ?>" title="<?php echo $code_item['C_Title'] ?>" rel="codeSubject" itemid="2905" isfav="0"  target="_blank">
                                        <?php echo $code_item['C_Title'] ?>
                                    </a>
                                </div>
                                <div class="codeDescription">
                                    <ul>
                                        <li>
                                            <a class="cate" href="<?php echo site_url(); ?>/Code/eidtCode/<?php echo $code_item['C_Id'] ?>" title="编辑">编辑</a>&nbsp;&nbsp;

                                            <a class="cate" href="<?php echo site_url(); ?>/Code/Del_Code/<?php echo $code_item['C_Id'] ?>" title="删除">删除</a>&nbsp;&nbsp;
                                        </li>
                                    </ul>
                                </div>
                                <div class="codeInfo">
                                    发表于
                                    <span title="<?php echo $code_item['C_Time'] ?>" class="time"><?php echo $code_item['C_Time'] ?></span>
                                </div>
                            </div>
                            <?php
                        }
                    }
                    ?>
                </div>
            </div>
        </div>
    </body>
</html>
